package com.prp.db.daoimpl.mysql;

import com.prp.db.DAOFactory;
import com.prp.db.idao.IArtificialNeighborRecommendationRecordDAO;
import com.prp.db.idao.IArtificialSubjectRecommendationRecordDAO;
import com.prp.db.idao.IAuthenticationDAO;
import com.prp.db.idao.ICommunityDAO;
import com.prp.db.idao.IGradeDAO;
import com.prp.db.idao.IKeywordsLibDAO;
import com.prp.db.idao.IKeywordsOfRecommendationDAO;
import com.prp.db.idao.IMailDAO;
import com.prp.db.idao.IMailboxDAO;
import com.prp.db.idao.IMsgboardDAO;
import com.prp.db.idao.INeighbourRelationshipDAO;
import com.prp.db.idao.IRecommendationEntityDAO;
import com.prp.db.idao.IScoreRecordDAO;
import com.prp.db.idao.ISearchRecordDAO;
import com.prp.db.idao.ISubjectCategoryDAO;
import com.prp.db.idao.ISubjectChildCategoryDAO;
import com.prp.db.idao.ISubjectCommentDAO;
import com.prp.db.idao.ISubjectRecommendationDAO;
import com.prp.db.idao.ITempKeywordDAO;
import com.prp.db.idao.IUserInformationDAO;
import com.prp.db.idao.IUserRecommendationDAO;
import com.prp.db.idao.IUserStateDAO;
import com.prp.db.po.AuthenticationDAO;

public class HibernateDAOFactory extends DAOFactory {

	private ArtificialNeighborRecommendationRecordDAO artificialNeighborRecommendationRecordDAO;

	@Override
	public IArtificialNeighborRecommendationRecordDAO getArtificialNeighborRecommendationRecordDAO() {
		if (artificialNeighborRecommendationRecordDAO == null)
			artificialNeighborRecommendationRecordDAO = new ArtificialNeighborRecommendationRecordDAO();
		return artificialNeighborRecommendationRecordDAO;
	}

	private ArtificialSubjectRecommendationRecordDAO artificialSubjectRecommendationRecordDAO;

	@Override
	public IArtificialSubjectRecommendationRecordDAO getArtificialSubjectRecommendationRecordDAO() {
		if (artificialSubjectRecommendationRecordDAO == null)
			artificialSubjectRecommendationRecordDAO = new ArtificialSubjectRecommendationRecordDAO();
		return artificialSubjectRecommendationRecordDAO;
	}

	private CommunityDAO communityDAO;

	@Override
	public ICommunityDAO getCommunityDAO() {
		if (communityDAO == null)
			communityDAO = new CommunityDAO();
		return communityDAO;
	}

	private GradeDAO gradeDAO;

	@Override
	public IGradeDAO getGradeDAO() {
		if (gradeDAO == null)
			gradeDAO = new GradeDAO();
		return gradeDAO;
	}

	private ScoreRecordDAO scoreRecordDAO;

	@Override
	public IScoreRecordDAO getScoreRecordDAO() {
		if (scoreRecordDAO == null)
			scoreRecordDAO = new ScoreRecordDAO();
		return scoreRecordDAO;
	}

	private KeywordsLibDAO keywordsLibDAO;

	@Override
	public IKeywordsLibDAO getKeywordsLibDAO() {
		if (keywordsLibDAO == null)
			keywordsLibDAO = new KeywordsLibDAO();
		return keywordsLibDAO;
	}

	private MsgboardDAO msgboardDAO;

	@Override
	public IMsgboardDAO getMsgboardDAO() {
		if (msgboardDAO == null)
			msgboardDAO = new MsgboardDAO();
		return msgboardDAO;
	}

	private NeighbourRelationshipDAO neighbourRelationshipDAO;

	@Override
	public INeighbourRelationshipDAO getNeighbourRelationshipDAO() {
		if (neighbourRelationshipDAO == null)
			neighbourRelationshipDAO = new NeighbourRelationshipDAO();
		return neighbourRelationshipDAO;
	}

	private RecommendationEntityDAO recommendationEntityDAO;

	@Override
	public IRecommendationEntityDAO getRecommendationEntityDAO() {
		if (recommendationEntityDAO == null)
			recommendationEntityDAO = new RecommendationEntityDAO();
		return recommendationEntityDAO;
	}

	private SearchRecordDAO searchRecordDAO;

	@Override
	public ISearchRecordDAO getSearchRecordDAO() {
		if (searchRecordDAO == null)
			searchRecordDAO = new SearchRecordDAO();
		return searchRecordDAO;
	}

	private SubjectCategoryDAO subjectCategoryDAO;

	@Override
	public ISubjectCategoryDAO getSubjectCategoryDAO() {
		if (subjectCategoryDAO == null)
			subjectCategoryDAO = new SubjectCategoryDAO();
		return subjectCategoryDAO;
	}

	private SubjectChildCategoryDAO subjectChildCategoryDAO;

	@Override
	public ISubjectChildCategoryDAO getSubjectChildCategoryDAO() {
		if (subjectChildCategoryDAO == null)
			subjectChildCategoryDAO = new SubjectChildCategoryDAO();
		return subjectChildCategoryDAO;
	}

	private SubjectCommentDAO subjectCommentDAO;

	@Override
	public ISubjectCommentDAO getSubjectCommentDAO() {
		if (subjectCommentDAO == null)
			subjectCommentDAO = new SubjectCommentDAO();
		return subjectCommentDAO;
	}

	private SubjectRecommendationDAO subjectRecommendationDAO;

	@Override
	public ISubjectRecommendationDAO getSubjectRecommendationDAO() {
		if (subjectRecommendationDAO == null)
			subjectRecommendationDAO = new SubjectRecommendationDAO();
		return subjectRecommendationDAO;
	}

	private UserInformationDAO userInformationDAO;

	@Override
	public IUserInformationDAO getUserInformationDAO() {
		if (userInformationDAO == null)
			userInformationDAO = new UserInformationDAO();
		return userInformationDAO;
	}

	private KeywordsOfRecommendationDAO keywordsOfRecommendationDAO;

	@Override
	public IKeywordsOfRecommendationDAO getKeywordsOfRecommendationDAO() {
		if (keywordsOfRecommendationDAO == null)
			keywordsOfRecommendationDAO = new KeywordsOfRecommendationDAO();
		return keywordsOfRecommendationDAO;
	}

	private AuthenticationDAO authenticationDAO;

	@Override
	public IAuthenticationDAO getAuthenticationDAO() {
		if (authenticationDAO == null)
			authenticationDAO = new AuthenticationDAO();
		return authenticationDAO;
	}

	private TempKeywordDAO tempKeywordDAO;

	@Override
	public ITempKeywordDAO getTempKeywordDAO() {
		if (tempKeywordDAO == null)
			tempKeywordDAO = new TempKeywordDAO();
		return tempKeywordDAO;
	}

	private MailDAO mailDAO;

	@Override
	public IMailDAO getMailDAO() {
		if (mailDAO == null)
			mailDAO = new MailDAO();
		return mailDAO;
	}

	private MailboxDAO mailboxDAO;

	@Override
	public IMailboxDAO getMailboxDAO() {
		if (mailboxDAO == null)
			mailboxDAO = new MailboxDAO();
		return mailboxDAO;
	}

	private UserStateDAO userStateDAO;

	@Override
	public IUserStateDAO getUserStateDAO() {
		if (userStateDAO == null)
			userStateDAO = new UserStateDAO();
		return userStateDAO;
	}

	private UserRecommendationDAO userRecommendationDAO;

	@Override
	public IUserRecommendationDAO getUserRecommendationDAO() {
		if (userRecommendationDAO == null)
			userRecommendationDAO = new UserRecommendationDAO();
		return userRecommendationDAO;
	}
}
